//Name:
//Purpose:
//Author: wjy
//Date: 2022-01-25 15:55:46
//From:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int n, temp = 1;
    float e = 1.0f;
    printf("Enter a num: ");
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
    {
        temp = temp * i;
        e = e + 1.0f / temp;
    }
    printf("%f\n", e);
    system("pause");
    return 0;
}